<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //字符串的预防
        let str = 'jack中文'
        let str1 = "jack中文"
        let str2 = `jack中文`

        console.log(str2)

        //字符串拼接
        let age = 25
        console.log(1 + 1)  //数字相加
        console.log("123" + "456")  //字符串相连
        document.write("我今年" + age + "岁")  //字符串+数字 数字转换为字符串再相加

        //模板字符串
        let name = 'Jack'
        document.write(`我叫${name}, 今年${age}岁`) 


        
    </script>
</body>
</html>